<template>
	<view>
		<view class="bg-white padding-lr">
			<view class=" padding-xs flex align-center">
				<view class="flex-sub text-center">
					<view class=" text-sl padding">
						<text class=" cuIcon-timefill text-blue" v-if="detail.status == 1"></text>
						<text class=" cuIcon-roundcheckfill text-green" v-if="detail.status == 2"></text>
						<text class=" cuIcon-roundclose text-red" v-if="detail.status == 3"></text>
					</view>
					<text class="text-black text-bold" v-if="detail.status == 1">
						您的申请已提交成功！平台将在48小时内处理
					</text>
					<text class="text-black text-bold" v-if="detail.status == 2">
						提现成功，已付款至预留的提现账号中
					</text>
					<text class="text-black text-bold" v-if="detail.status == 3">
						提现失败,{{detail.remark}}
					</text>
				</view>
			</view>
		</view>
		<view class="cu-bar bg-white solid-bottom">
			<view class='action'>
				<text class='text-black'>订单号：{{detail.flowNo}}</text>
			</view>
		</view>
		<view class="cu-bar bg-white solid-bottom">
			<view class='action'>
				<text class='text-black'>提现手续费：</text>
				<text class="text-red">{{detail.taxrate + detail.platformRate}}%</text>
			</view>
		</view>
		
		<view class="cu-bar bg-white solid-bottom">
			<view class='action'>
				<text class='text-black'>提现金额：</text>
				<text class="text-red text-price">{{detail.money}}</text>
			</view>
		</view>
		<view class="cu-bar bg-white solid-bottom">
			<view class='action'>
				<text class='text-black'>实际到账：</text>
				<text class="text-red text-price">{{detail.actualMoney}}</text>
			</view>
		</view>
		<view class="cu-bar bg-white solid-bottom">
			<view class='action'>
				<text class='text-black'>提现状态：提现{{ detail.status == 1 ? '中' : detail.status == 2 ? '成功' : '失败' }}</text>
			</view>
		</view>
		<view class="cu-bar bg-white solid-bottom">
			<view class='action'>
				<text class='text-black'>申请时间：{{detail.applyTime}}</text>
			</view>
		</view>
		<view class="cu-bar bg-white solid-bottom">
			<view class='action'>
				<text class='text-black'>到账时间：{{null == detail.payTime ? '' : detail.payTime}}</text>
			</view>
		</view>
		
		<view class="cu-bar bg-white solid-bottom">
			<view class='action'>
				<text class='text-black'>收款方式：{{ collectionInfo.payType == 1 ? '银行卡' : collectionInfo.payType == 2 ? '支付宝' : '微信' }}</text>
			</view>
		</view>
		<view class="cu-bar bg-white solid-bottom">
			<view class='action'>
				<text class='text-black'>收款人姓名：{{ collectionInfo.fullName}}</text>
			</view>
		</view>
		<view class="cu-bar bg-white solid-bottom">
			<view class='action'>
				<text class='text-black'>收款账号：{{ collectionInfo.account}}</text>
			</view>
		</view>
		<view class="cu-bar bg-white solid-bottom">
			<view class='action'>
				<text class='text-black'>预留手机号：{{ collectionInfo.resMobile}}</text>
			</view>
		</view>
		
		<view class="cu-bar bg-white solid-bottom">
			<view class='action'>
				<text class='text-black'>备注：{{detail.remark}}</text>
			</view>
		</view>
		
	</view>
</template>

<script>

const http = require('../../utils/http.js');

export default {
    components: {
    },
    data() {
        return {
			detail:null,
			collectionInfo:null,
			id:0
        };
    },
    onLoad: function (options) {
		this.id = options.id;
		this.getDetail();
    },
    onPullDownRefresh: function () {
		
	},
    onReachBottom: function () {
       
    },
    methods: {
		
        getDetail: function () {
            let that = this;
			uni.showLoading({
				title:'加载中'
			})
            var params = {
				baseUrl:true,
                url: '/u/withdrawal/getDetail/'+that.id,
                method: 'GET',
                data: {
                },
                callBack: function (res) {
					if(res.code == 200){
						that.setData({
						    detail: res.data.withdrawalDetails,
							collectionInfo: res.data.collectionInfo
						});
					}
					uni.hideLoading()
                }
            };
            http.request(params);
        },
    }
};
</script>


<style>
@import './withdrawalDetail.css';

page{
	background-color: #ffffff;
}


.cu-bar{
	min-height: 40px;
}
</style>
